package cn.idongjia.mqserver.impl;

import cn.idongjia.mq.config.MessageQueueService;
import cn.idongjia.mq.config.MqConfig;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * Created by renxianlong on 16/3/28.
 */
@Component("mqService")
public class MessageQueueServiceImpl implements MessageQueueService{

    @Value("${rocketmq.nameserveraddr}")
    private String nameServerAddr;

    @Override
    public MqConfig getMqConfig() {
        MqConfig config = new MqConfig();
        config.setClusterAddr(nameServerAddr);
        return config;
    }
}
